* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #f5f5f5;
}

#root {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
  filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  a:nth-of-type(2) .logo {
    animation: logo-spin infinite 20s linear;
  }
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

.app-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.detection-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100vw;
}

.chart-container {
  width: 100%;
  background: white;
  padding: 16px 0;
  margin-bottom: 12px;
  position: relative;
}

.chart-container.fullscreen {
  padding: 0;
  margin: 0;
  height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background: #fff;
}

.echarts-container {
  width: 100vw;
  height: 40vh;
  min-height: 300px;
  cursor: pointer;
}

.chart-container.fullscreen .echarts-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.current-data {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  line-height: 1.5;
  z-index: 1;
}

.current-data > div {
  color: #333;
  font-weight: 500;
}

.form-container {
  flex: 1;
  background: white;
  padding: 16px;
  margin-bottom: 50px; /* 为底部 TabBar 留出空间 */
}

.history-container {
  flex: 1;
  background: white;
}

.record-time {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.record-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
}

/* Ant Design Mobile 组件样式覆盖 */
.adm-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #eee;
}

/* 全屏模式提示 */
.chart-container:not(.fullscreen) .echarts-container:hover::after {
  content: '点击进入全屏模式';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s;
}

.chart-container:not(.fullscreen) .echarts-container:hover::after {
  opacity: 1;
}
